#include <windows.h>

#define ID_CHECK_NOW    100
#define ID_TRAY_EXIT_CONTEXT_MENU_ITEM  3000
#define ID_TRAY_HIDE_CONTEXT_MENU_ITEM  3001
#define ID_TRAY_SHOW_CONTEXT_MENU_ITEM  3002

typedef void (*on_size)(struct window* w, int cmd, int x, int y);

struct window
{
    HWND hwnd;
    HWND edit;
    HMENU menu;
    HWND button;
    HGDIOBJ font;
};

int window_init(struct window* w);
int window_create(struct window* w, const WNDCLASSEXW* wnd, int cmd_show);
int window_on_create(struct window* w);
void window_minimize(struct window* w);
void window_restore(struct window* w);
void window_track_menu(struct window* w);
void window_append_text(struct window* w, const wchar_t* ustr);
int window_size(struct window* w, int cmd, int x, int y);
